'; window.popUpWin.document.write(zhtm); window.popUpWin.document.close(); // Johnny Jackson 4/28/98 } //--> Inside AutoCAD 14 -- Ch 5 -- Using Linetypes Effectively


Inside AutoCAD 14

Previous chapterNext chapterContents


- 5 -

Using Linetypes Effectively


by Michael E. Beall

To add an object to your drawing that is drawn with something other than a continuous, solid line, you must change the linetype. This chapter explains how, when, and where to use the various linetypes provided with AutoCAD 14. The first section presents the basic concepts and applications of linetypes, and the second section covers the process of creating your own linetypes. The sections are subdivided as follows.

The section, "Working with Existing Linetypes," discusses the following:

The section, "Creating and Using Customized Linetypes," discusses the following:

Working with Existing Linetypes

Each new release of AutoCAD provides you with an updated collection of linetypes to use in your drawings. Although you may need to create your own linetypes, 45 linetypes are at your disposal for immediate use. This section teaches you the basics, along with some effective methods of using linetypes, as well as a few tips and tricks.

Assigning a Linetype to a Layer

In Chapter 4, "Organizing Drawings with Layers," you learned that the layer and color values are two properties assigned to objects. The object's linetype is also property. Similar to assigning a color to a layer, a linetype value can be assigned to the layer on which the object will be drawn. Release 14 allows for on-the-fly linetype property assignment prior to drawing the object. You also can modify the linetype after the object has been drawn. All 45 default linetypes are stored in the acad.lin file, which is in the Acadr14\Support folder. Table 5.1 shows the linetypes available in Release 14.

Table 5.1 The Available AutoCAD 14 Linetypes

Linetype Name Description
Acad_iso02w100 ISO dash __ __ __ __ __ __ __ __ __ __ __ __ __ __
Acad_iso03w100 ISO dash space __ __ __ __ __ __ __ __
Acad_iso04w100 ISO long-dash dot ____ . ____ . ____ . ____ . ____ .
Acad_iso05w100 ISO long-dash double-dot ____ .. ____ .. ____ .. ____ ..
Acad_iso06w100 ISO long-dash triple-dot ____ ... ____ ... ____ ... ____ ...
Acad_iso07w100 ISO dot . . . . . . . . . . . . . . . . . . . . . . . . . .
Acad_iso08w100 ISO long-dash short-dash____ __ ____ __ ____ __ ____ __
Acad_iso09w100 ISO long-dash double-short-dash ____ __ __ ____ __ __
Acad_iso10w100 ISO dash dot __ . __ . __ . __ . __ . __ . __ . __ . __ . __
Acad_iso11w100 ISO double-dash dot __ __ . __ __ . __ __ . __ __ . __ __ .
Acad_iso12w100 ISO dash double-dot __ . . __ . . __ . . __ . . __ . . __ . . __
Acad_iso13w100 ISO double-dash double-dot __ __ . . __ __ . . __ __ . . __ __ .
Acad_iso14w100 ISO dash triple-dot__ . . . __ . . . __ . . . __ . . . __ . . .
Acad_iso15w100 ISO double-dash triple-dot __ __ . . . __ __ . . . __ __ . . .
Batting Batting SSSSSSSSSSSSSS
Border Border __ __ . __ __ . __ __ . __ __ . __ __ . __ __ . __ __ .
Border2 Border2 (.5x) __.__.__.__.__.__.__.__.__.__.__.__.__.__.__.__
Borderx2 Borderx2 (2x) ____ ____ . ____ ____ . ____ ____ . __
Center Center ____ _ ____ _ ____ _ ____ _ ____ _ ____ _ ____
Center2 Center2 (.5x) ___ _ ___ _ ___ _ ___ _ ___ _ ___ _ ___ _ ___
Centerx2 Centerx2 (2x) ________ __ ________ __ ________ __ _____
Dashdot Dashdot __ . __ . __ . __ . __ . __ . __ . __ . __ . __
Dashdot2 Dashdot2 (.5x) _._._._._._._._._._._._._._._._._._._._._._._._
Dashdotx2 Dashdotx2 (2x) ____ . ____ . ____ . ____ . ____ . __
Dashed Dashed __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
Dashed2 Dashed2 (.5x) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Dashedx2 Dashedx2 (2x) ____ ____ ____ ____ ____ ____ ____ ____
Divide Divide ____ . . ____ . . ____ . . ____ . . ____ . . __
Divide2 Divide2 (.5x) __..__..__..__..__..__..__..__..__..__..__..__.
Dividex2 Dividex2 (2x) ________ . . ________ . . ________ . .
Dot Dot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Dot2 Dot2 (.5x).....................................................................
Dotx2 Dotx2 (2x) . . . . . . . . . . . . . . . . . . . . . . . . . .
Fenceline1 Fenceline circle ----O----O----O----O----O----O----O----O
Fenceline2 Fenceline square ----[]----[]----[]----[]----[]----[]----]
Gas_line Gas line ----GAS----GAS----GAS----GAS----GAS----GAS
Hidden Hidden __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
Hidden2 Hidden2 (.5x) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Hiddenx2 Hiddenx2 (2x) ____ ____ ____ ____ ____ ____ ____ ____
Hot_water_supply Hot water supply ---- HW ---- HW ---- HW ---- HW ---- HW
Phantom Phantom ______ __ __ ______ __ __ ______ __ __
Phantom2 Phantom2 (.5x) ___ _ _ ___ _ _ ___ _ _ ___ _ _ ___ _ _
Phantomx2 Phantomx2 (2x) ____________ ____ ____ ____________
Tracks Tracks --|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|
Zigzag Zig zag /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\

As you can see from the preceding table, most linetypes are a collection of three, such as Border, Border2, and Borderx2; Center, Center2, and Centerx2; and so on. Notice that at the beginning of the description for these linetypes a factor is indicated. In essence you have a "standard," "half," and "double" scale arrangement, respectively. With the exception of the 14 Acad_iso linetypes, any linetype names without the "x2" or "2" suffix are the base linetypes, or the standard of the three.


NOTE: The sample ISO (International Standards Organization) linetypes found in the acad.lin file are designed for metric use with a pen width of 1 mm. To use them with the ISO predefined pen widths, the line has to be scaled with the appropriate value (for example, pen width 0.5 mm and LTSCALE 0.5).

One of the more common methods of using a linetype on your drawing is to assign it to a layer. In this case, the linetype property for new objects would be ByLayer. In an effort to conserve system memory, the Continuous linetype is the only linetype available when you start a new drawing. In the following exercise, you open an existing drawing and create a new layer, load the Hidden linetype, and assign it to the new layer.

SETTING THE LINETYPE PROPERTY TO BYLAYER

1. Open the drawing 05CAD-01.DWG and choose Layers from the Object Properties toolbar.

2. Create a new layer called Drawer, and then choose Continuous in the Linetype column to open the Select Linetype dialog box (see fig. 5.1).

Figure 5.1 The Select Linetype dialog box.

3. Because Continuous is the only loaded linetype in the drawing so far, click on the Load button to display the Load or Reload Linetypes dialog box (see fig. 5.2).

The available linetypes from the default file of acad.lin are displayed in a list that has a vertical scroll bar.

4. Scroll down and select the Hidden linetype. Then click on OK to load the Hidden linetype and return to the Select Linetype dialog box.

Figure 5.2 The Load or Reload Linetypes dialog box.

5. Select Hidden from the Loaded linetypes list. Then click on OK to return to the Layer tab and verify that Hidden is the linetype associated with the new Drawer layer.

6. Click on the Current button to set the Drawer layer to be current, and then click on OK to return to the drawing window.

7. With the Linetype drop-down list displaying the setting of - - - - - - - ByLayer, choose Rectangle from the Draw toolbar. The following prompt appears:

First corner:

8. Pick 1 at the point 10.50,10.50, as shown in figure 5.3. The following prompt appears:

Other corner:

9. Pick 2 at point 23.50,15.50 to place the other corner of the rectangle and complete the command.

10. Choose Save to issue the QSAVE command and save the drawing.

Figure 5.3 The drawer drawn in the Hidden linetype.


TIP: Because AutoCAD is considered Windows-compliant, in most alphabetized listings throughout Release 14, pick anywhere in the listing, and then enter the first character of the file/item you are seeking. This causes AutoCAD to jump to the first item in the list that begins with that character. You can scroll from there to make your selection if needed.

On some of your screens, the dashed lines of the Hidden linetype may be difficult to distinguish, or might even be indiscernible. One alternative is to choose a different linetype for the Drawer layer. To help you more fully appreciate the benefits of having the linetype for new objects set to ByLayer, the following exercise changes the linetype associated with the Drawer layer. The drawing will automatically update all objects drawn on that layer with the new linetype.

CHANGING THE LINETYPE ASSOCIATED WITH THE LAYER

1. Continuing from the previous exercise, choose Layers from the Object Properties toolbar.

2. Choose Hidden in the Linetype column for the Drawer layer to open the Select Linetype dialog box.

3. Click on the Load button to open the Load or Reload Linetypes dialog box. Then scroll down and select the Hiddenx2 linetype. Click on OK to return to the Select Linetype dialog box.

4. Select Hiddenx2 from the list, and then click on OK to return to the Layer tab. Click on OK again to return to the drawing.

5. By changing the linetype associated with the Drawer layer, the drawing automatically regenerates to display the new rectangle in the Hiddenx2 linetype (see fig. 5.4). Choose Save to save the drawing.

Figure 5.4 The updated drawing with the Hiddenx2 linetype.


NOTE: If you feel that you will need several different linetypes in your drawing, choose the first linetype in the Load or Reload Linetypes dialog box. Scroll to the bottom of the list and, while holding down the Shift key, pick the last linetype. This will effectively select all items in the list. This method of selecting items in a list is a Windows 95/NT function of selecting a range of items.

Working with the Linetype Scale Factor

In the previous exercise, the linetype was changed to the Large size in order to get longer dashes on the rectangle representing the drawer behind the faceplate. For drawings in which even longer dashes are required, simply modify the linetype scale for the object. To establish a point of departure, figure 5.5 illustrates the dimensional relationship between the Dashed and Hidden linetypes. Knowing what the real distances are for the spaces and dashes of the different linetypes will help you understand how to modify their length.

Figure 5.5 Dimensional relationship between the Dashed and Hidden linetypes.

The most effective method of accommodating the need for longer (or shorter) increments of a non-Continuous linetype is to modify the LTSCALE (LineType SCALE) variable. This variable enables you to apply a factor to the scale of all non-Continuous linetypes in the drawing. It is a global setting within each drawing and should, therefore, be used wisely. The default value for LTSCALE is 1.0000. It is apparent from figure 5.5 that the default LTSCALE factor of 1.0000 is based upon the Dashed linetype.

In the following exercise, you change the LTSCALE factor to 1.5 using the Details options in the Linetype tab, as shown in figure 5.6. This will effectively result in a rectangle with dashes that are 50 percent longer.

Figure 5.6 The extended Linetype tab displaying the Details options.

MODIFYING THE LTSCALE VARIABLE

1. Continuing from the previous exercise, choose Layers from the toolbar to open the Layer & Linetype Properties dialog box.

2. Select the Linetype tab, and then click on Details to display the available features.

3. Change the value for the Global scale factor to 1.5000, and then press Enter. Your drawing will automatically regenerate to display the effect of the change.

4. Choose Save to save the drawing.

Alternative Settings for the Linetype of New Objects

In the previous series of exercises, the linetype setting for new objects was set to ByLayer. But suppose you want to draw a dashed line on a layer with a Continuous linetype? This is not uncommon in that it may not be necessary to create a separate layer only for a few objects that require hidden lines.

This section on alternative linetypes presents two methods that enable you to set the linetype property for new objects to something other than ByLayer. In doing so, you are essentially overriding the ByLayer linetype setting. In the following exercise, you set the linetype for new objects independent of the layer setting by using the Linetype tool on the Object Properties toolbar and the Linetype drop-down list.


TIP: When creating or adding to multi-view drawings, it might be advantageous to set the size of the cursor to 100 percent of the screen in the Pointer tab of the Preferences dialog box. This will enable you to more easily confirm placement of lines in the different views.

SETTING THE LINETYPE FOR NEW OBJECTS

1. Open the drawing 05CAD-02.DWG and choose the Layers tool. Notice that the current linetype setting for the Objects layer is Continuous. Click on OK.

2. Choose the Linetype tool on the Object Properties toolbar to open the Linetype tab of the Layer & Linetype Properties dialog box.

3. Click on Load to open the Load or Reload Linetypes dialog box. Scroll down so you can see all three Dashed linetypes.

4. Holding the Shift key down, select Dashed, Dashed2, and Dashedx2 to highlight all three. Then release the Shift key and click on OK.

5. Select Dashed from the list, and then click on Current to set the linetype for the new objects you will create. This effectively overrides the ByLayer setting.

6. Click on OK to close the Layer & Linetype Properties dialog box. Pick the Line tool from the Draw toolbar. The following prompt appears:

_line From point:

7. Pick 1 at the point 3.25,12.50 to begin the line (see fig. 5.7). The following prompt appears:

To point:

8. Pick 2 at the point 3.25,11.00, and press Enter to complete the LINE command.

9. From the pull-down menus, choose Tools, Preferences. Select the Pointer tab of the Preferences dialog box.

10. In the Cursor size area at the bottom of the Pointer tab, change the Percentage of screen size value to 100. Press Enter to close the Preferences dialog box and apply the change.

11. Choose the Line tool again and pick points 3 and 4 to draw the second line for the hole. Press Enter to end the LINE command.

Figure 5.7 The dashed line locations in the three-view drawing.

12. Select Dashed2 from the Linetype drop-down list to set the linetype for the next object you will create.

13. Use the LINE command again and pick 5 at the point 15.50,6.00, and 6 at the point 15.50,2.00. Then press Enter.

14. From the Linetype drop-down list, select the Dashed linetype again, and use the LINE command to draw the remaining dashed lines for the drawing (see fig. 5.7).


In the final few steps of this exercise you return to the ByLayer setting for the linetype and add the center lines for the holes in the bracket.

15. Choose the Layers tool, then choose the Center_lines layer in the list and set it to current.

16. Select Continuous in the Linetype column for the Center_lines layer. Click on Load from the Select Linetype dialog box.

17. From the Load or Reload Linetypes dialog box, choose Center, and then click on OK to return to the Select Linetype dialog box.

18. Choose Center from the Loaded linetypes list, and click on OK to assign the linetype. Click on OK again to return to the drawing.

19. Choose ByLayer from the Linetype drop-down list, and then choose the Line tool.

20. Draw the horizontal center line from 1 to 2 as shown in figure 5.8, and then press Enter to end the LINE command.

21. Add the two vertical center lines to the drawing, and then choose Save.

Figure 5.8 The three center lines for the circles.

Deleting Loaded Linetypes

It's pretty fair to say that the capabilities of the technology (hardware, memory, storage, and so on) can now adequately support the power of high-quality software, such as Release 14. Because of this, the importance of deleting extraneous linetypes (or layers) from a listing is not so much a system-saving issue as one of convenience and clarity. In Chapter 4, "Organizing Drawings with Layers," you learned how to delete a layer from the listing. The process of deleting a linetype from the Linetype tab of the Layers & Linetypes Properties dialog box is essentially similar to that of deleting layers. The single caveat to keep in mind is that all objects referencing any linetype(s) to be deleted must be erased first.

Setting an Explicit Linetype Scale for Objects

An object's linetype property can have the value of the layer (using the ByLayer setting), or it can be set explicitly by choosing a linetype to be used for new objects. Similarly, the object's linetype scale can be set independently of the current LTSCALE factor. This is where the waters can get a bit muddy. Bearing in mind that the LTSCALE value is applied globally to all non-Continuous linetypes in the drawing, it may be more advantageous to leave LTSCALE at the default factor of 1 and assign linetype scale factors to the objects individually. This can be done as they are being created or when they are modified later. To explicitly assign a scale factor to new objects, you set the CELTSCALE, which governs the Current object's LineType scale. Figure 5.9 illustrates the relationship between the Global scale factor (LTSCALE) and the Current object scale factor (CELTSCALE) applied to a Dashed linetype.

Figure 5.9 The LTSCALE and CELTSCALE relationship.

In the following exercise, you set Current object scale factors in the Details area of the Linetype tab. The comparison will be made using different values for the CENTER2 linetype.

EXPLICITLY SETTING THE LINETYPE SCALE FOR NEW OBJECTS

1. Continuing from the previous exercise, choose the Linetype tool.

2. Change the Current object scale factor from 1.0000 to 1.5000, and click on OK. Because this is for objects yet to be drawn, the drawing has nothing to regenerate.

3. Use the LINE command to draw a new center line from 1 to 2 as shown in figure 5.10. Then press Enter.

Figure 5.10 The center lines with different Current object scale factors for the linetype.

4. Choose the Linetype tool again. Change the Current object scale factor from 1.50 to 0.75, and click on OK.

5. Use the LINE command again to draw another center line from 3 to 4. Press Enter and save the drawing.


NOTE: The Current object scale factor (CELTSCALE) is not multiplied by the Global scale factor (LTSCALE). Only existing objects drawn in a non-Continuous linetype will be updated automatically when the Global scale factor is changed.

You can easily see the difference between the two scale factors. Also, remember that the current linetype property is ByLayer and that the lines were drawn on a layer with the linetype setting of Center. These are very powerful features and once you understand their relationship, your ability to quickly change how objects appear will increase dramatically.

Modifying the Linetype and Scale Factor of Existing Objects

You can easily modify an object's linetype or linetype scale by using the Properties tool introduced in Chapter 4, "Organizing Drawings with Layers." With this feature, you also can change the linetypes and/or linetype scales of one or more objects. When using the DDMODIFY or DDCHPROP commands to change the linetype scale of selected object(s), the change only applies to the object(s) selected; it does not change the current value displayed in the Current object scale (CELTSCALE) field of the Linetype tab.

The Match Properties tool, also introduced in Chapter 4, "Organizing Drawings with Layers," enables you to change geometrical properties by matching the properties of another object in the drawing. As is often the case, you may need to simply inquire existing geometry's properties or values prior to making a change. The LIST command will return information about the object(s) selected. In the following exercise, you use the Properties tool and the Match Properties tool to update the lines in the drawing.

MODIFYING THE LINETYPE AND LINETYPE SCALE OF EXISTING OBJECTS

1. Continuing from the previous exercise, choose the Properties tool from the Object Properties toolbar.

2. Select all the center lines you have drawn, and press Enter to display the Change Properties dialog box (see fig. 5.11).

Figure 5.11 The Change Properties dialog box.

3. Change the Linetype Scale value from Varies to 0.75, and click on OK. The drawing will regenerate to update the selected lines.

4. From the pull-down menus, choose Tools, Inquire, List.

5. Select the vertical dashed line at 1 as shown in figure 5.12, and then press Enter. Your screen will switch to the AutoCAD Text Window in which you will see the following display of properties and other information regarding the selected line:

LINE Layer: OBJECT Space: Model space Color: ByLayer Linetype: DASHED2 Handle = 5D from point, X = 15.50 Y = 6.00 Z = 0.00 to point, X = 15.50 Y = 2.00 Z = 0.00 Length = 4.00, Angle in XY Plane = 270 Delta X = 0.00, Delta Y = -4.00, Delta Z = 0.00

Figure 5.12 Selection of the dashed line to be modified.

6. Press F2 to switch back to the drawing window. Choose the Match Properties tool on the Standard toolbar.

7. When prompted to Select Source Object, pick the dashed line at 2, and press Enter.

8. Pick the vertical dashed line at 1 again as the destination for the source object's properties and press Enter. The drawing is updated with the new property assignments.

Creating and Using Customized Linetypes

This chapter is intended to bring you up to speed in not only using the simple linetypes provided with AutoCAD Release 14, but also in creating your own complex linetypes by building upon those that already exist. Although many applications can benefit from the array of available linetypes, you can customize or create an application-specific linetype with Release 14. This section takes you through the process of customizing linetypes and takes you through an exercise or two to illustrate their use.

Using Sample Complex Linetypes

In the first section of this chapter you learned how to load and use simple linetypes. A simple linetype is one that contains only dashes, dots, and spaces. A complex linetype, on the other hand, is a linetype that contains something other than the normal patterns of dashes and dots. It can contain text objects, angled or orthogonal lines, or other shapes you might create. As mentioned earlier in this chapter, the complex linetypes are found in the acad.lin file along with the other simple linetypes used in the exercises. The acad.lin file is an ascii text definition file that can be opened and modified to change the look of an existing linetype or to add a new one.

Table 5.2 lists and defines the seven sample customized linetypes and the three Center linetypes found in the acad.lin file to give you an idea of how simple linetype definitions appear.

Table 5.2 Comparing Complex Linetypes and Simple Center Linetypes

Linetype Appearance Definition
Fenceline1 ----0----0---- A,.25,[CIRC1,ltypeshp.shx,s=.1],-.2,1
Fenceline2 ----[]----[]---- A,.25,[BOX,ltypeshp.shx,s=.1],-.2,1
Tracks -|-|-|-|-|-|-|-|- A,.15,[TRACK1,ltypeshp.shx,s=.25],.15
Batting SSSSSSSSSS A,.0001,[BAT,ltypeshp.shx,s=.1],-.4
Hot_water_supply ---- HW ---- HW A,.5,-.2,["HW",STANDARD,S=.1,
R=0.0,X=-0.1,Y=-.05],-.2
Gas_line ----GAS----GAS A,.5,-.2,["GAS",STANDARD,S=.1,
R=0.0,X=-0.1,Y=-.05],-.25
Zigzag /\/\/\/\/\/\/\/\ A,.0001,[ZIG,ltypeshp.shx,s=.2],-.8
Center ____ _ ____ _ A,1.25,-.25,.25,-.25
Center2 ___ _ ___ _ ___ A,.75,-.125,.125,-.125
Centerx2 ________ __ A,2.5,-.5,.5,-.5

An observation is in order here regarding the default size of the linetype patterns. Throughout AutoCAD, you will encounter default settings in any number of commands and options. Historically speaking, AutoCAD's default values have always been small; they have been essentially designed for geometry-defining objects smaller than a breadbox. In the following exercise, you load the linetype definition file and use some sample linetypes in a site plan drawing--an application significantly larger than a breadbox. For that reason, the exercise also presents an excellent opportunity to increase the Global scale factor of all linetypes.

DRAWING WITH TWO SAMPLE LINETYPES

1. Open the drawing 05CAD-03.DWG located in the sample directory and choose the Linetype tool on the Object Properties toolbar.

2. Click on the Load button from the Linetype tab to open the Load or Reload Linetypes dialog box.

3. Scroll down the Linetype column and select Fenceline1. Scroll down further and press the Ctrl key on the keyboard and select the linetype Tracks.

4. Click on OK to load those two linetypes into the linetype list.

5. Change the Global scale factor in the Linetype tab from 1.0000 to 480.

6. Click on the Layer tab and select Continuous in the Linetype column for the Tracks layer to open the Select Linetype dialog box.

7. Select the Tracks linetype from the list, then click on OK to return to the Layer tab.

8. Click on OK. Select Continuous in the Linetype column for the Fencing layer to re-open the Select Linetype dialog box.

9. Select the Fenceline1 linetype from the Linetype list, and click on OK.

10. Confirm that the Tracks layer is current, and then click on OK to return to the drawing.

11. Choose the Line tool from the Draw toolbar and pick 1, then 2, as shown in figure 5.13. Press Enter to end the LINE command.

12. Set the layer FENCE1 to be Current in the Layer drop-down list, and choose the Linetype tool.

13. Change the Current object scale value to 0.5, and click on OK.

14. Use the LINE command to draw the fence line by picking points 3-6. Press Enter to end the command.

15. Choose Save to save the drawing.

Figure 5.13 Creating the railroad and fence lines.

Inside the Simple Linetype Definition

Several terms are important to understand when creating your own linetype: Each linetype uses two lines of "code" to define the pattern of the linetype. The first line of code contains the name of the linetype and a description. The linetype name cannot contain spaces and begins with an asterisk, followed by a comma, after which you can add an optional description to help visualize the linetype. This is seen in the following guide and example for a linetype named INSIDE_DD:

*Linetype_name, optional description/appearance

*INSIDE_DD,__.__ . . __.__ . . ___.__ . . __.__

The second line of the linetype definition is the code defining the pattern for the "pen motion" used in creating a line in this linetype. The pattern always begins with the alignment code of "A," followed immediately by a comma-delimited series of descriptors that define the first full sequence of the linetype pattern. No spaces are allowed in the linetype definition. For simple linetypes, use the following syntax to create the pattern definition:

The following linetype pattern definition is for the INSIDE_DD linetype:

A,.25,-.1,0,-.1,.25,-.125,0,-.125,0,-.125


NOTE: The description of the linetype may be a graphic representation of the pattern or a line of text such as Use this linetype for property lines. This description will be displayed in the Load or Reload Linetypes dialog box. If you elect to omit the description on the first line, do not follow the linetype name with a comma.

Creating a Simple Linetype

One of the great benefits of working in the Windows environment is the ability to switch to another application, create or edit the desired file or document, and then switch back to the original application. You can have several applications or programs open concurrently.

In the following exercise, you open the Windows Notepad application and create a new linetype definition file named inside14.lin from the existing acad.lin, and then add a linetype definition for the INSIDE_DD linetype.

CREATING AND ADDING A NEW LINETYPE

1. Continuing from the previous exercise, open Notepad. If you're using Windows 95 or Windows NT 4.x, choose Start, Programs, Accessories, Notepad.

2. Choose File, Open and open the folder Acadr14\support using the Look in drop-down list in the Open dialog box.

3. Change the pattern in the File name edit box to *.lin, select acad.lin from the list, and then click on Open to display the Notepad application as shown in figure 5.14.

4. Choose File, Save As. Enter inside14.lin in the File name edit box, and click on OK.

Figure 5.14 The bottom of the inside14.lin file in Notepad.

5. Scroll down and add a new linetype name and definition at the bottom of the file, below the pattern definition for the Zigzag linetype, by entering the following:

*INSIDE_DD,__.__ . . __.__ . . ___.__ . .

6. On the second line, enter the following pattern definition (there are no spaces in this definition), and press Enter when finished:

A,.25,-.1,0,-.1,.25,-.125,0,-.125,0,-.125

7. Choose File, Save to save the inside14.lin, then switch back to the current session of AutoCAD in the 05CAD-03 drawing.

8. To use the new linetype definition, choose the Linetype tool to display the Linetype tab of the Layer & Linetype Properties dialog box, then click on the Load button.

9. Click on the File button of the Load or Reload Linetypes dialog box, select inside14.lin from the Acadr14\Support folder, and click on Open.

10. Choose Inside_DD from the Available linetypes listing (it's now alphabetized) and click on OK.

11. From the linetypes list, select Inside_DD and set the Current object scale to 1.0000 in the Details area of the Linetype tab.

12. Click on the Current button to set the Inside_DD linetype to current, then click on OK.

13. Choose the Line tool from the Draw toolbar and pick the points 1-3 as shown in figure 5.15. Then press Enter and save the drawing.

Figure 5.15 Placing the INSIDE_DD linetype.

Inside the Complex Linetype Definition

Linetypes containing text objects or shapes are considered complex because their pattern definition is a bit more complex than those containing dots, dashes, and spaces. Complex linetype definitions, however, may also contain the elements used in creating simple linetype definitions. The complex pattern takes two lines of definition. The first line of the definition, which contains the name and optional description, is identical to that of the simple linetype. The second line of the complex definition contains transformation elements in brackets that define the text and shapes used. The following is an example of a complex linetype using a line of text in the pattern. Figure 5.16 illustrates where some of the values are applied.

A,1,["4 BOARD",Instyle,S=.25,R=30,X=0,Y=-.75],-1.50

The beginning A and the pen up, pen down values are identical to the syntax used in simple linetypes. The [bracketed transformation elements] are defined in the following list, each element being separated by a comma (no spaces):

Figure 5.16 The 4 BOARD linetype and the applied variables.


NOTE: Including text styles using non-standard AutoCAD fonts in customized linetypes is not recommended. If you send the drawing to others they must have the same font files in order to reload and use the customized linetype in other drawings. This also may violate copyright laws if you copy your custom fonts to distribute to others.


NOTE: After the alignment character of A, the first numeric entry is for the length of the first dash. Although common in simple linetype definitions, it is not necessary to follow the dash length with a pen-up negative value when creating complex linetypes with transformation variables in brackets, especially if the text is to be rotated.

Creating a Complex Linetype

Using the same method you used to create the simple linetype, in the following exercise you switch back to the Notepad and add a new complex linetype for a 4 BOARD fence to the inside14.lin linetype file, and then add it to the current drawing.

CREATING AND ADDING THE COMPLEX LINETYPE

1. Continuing from the previous exercise, switch back to Notepad and place your cursor at the bottom of the file.

2. Enter the following for the first line of the complex linetype:

*4_BOARD,----4 BOARD----4 BOARD----4 BOARD

3. On the second line, enter the following pattern definition:

A,1,["4 BOARD",Instyle,S=.25,R=30,X=0,Y=-0.75],-1.50

4. Choose File, Save to save the inside14.lin. Then switch back to the current session of AutoCAD.

5. Choose the Linetype tool. Click on the Load button.

6. Click on the File button, select inside14.lin from the Support folder, and click on OK to return to the Load or Reload Linetypes dialog box.

7. Select 4_board from the Available linetypes list and click on OK.

8. Choose 4_board from the list on the Linetype tab. Click on the Current button, and enter 0.50 in the Current object scale field.

9. Choose the Line tool and pick 1-4 to place the 4 BOARD fence line, as shown in figure 5.17. Press Enter.

Figure 5.17 The 4_BOARD linetype drawn on the site plan.


NOTE: Any shapes or text contained in complex linetypes are always drawn in their entirety. AutoCAD Release 14 always begins and ends the complex linetype with a dash by making minor adjustments in the lengths of the segments at either end. Text and shapes in the complex linetype, therefore, will not be trimmed.

Modifying an Existing Complex Linetype

When creating new linetype definitions, especially complex ones, the result of your efforts is not always desirable. In the previous exercise, the length of the text is a little too long and the frequency of the text in the line could be a bit less. The rotation of 30 degrees is probably unnecessary as well, but it was interesting to see the results of rotated text in the complex linetype.

In the following exercise you switch back to the Notepad window and modify the rotation angle setting, change the text from "4 BOARD" to "4-BD," and increase the spacing of the text along the line.

MODIFYING THE COMPLEX LINETYPE

1. Continuing from the previous exercise, switch back to the Windows 95 Notepad and change the linetype description in the first line of the linetype definition to ----4-BD----4-BD----4-BD.

2. In the second line, change rotation element from R=30 to R=0 and change the text in quotes from "4_BOARD" to "4-BD."

3. Because the word is shorter now and is in-line, change the Y=value from Y=-0.75 to Y=-0.1 (notice it is still negative).

4. Make the necessary dash and space changes at the beginning and end of the definition so your complex linetype definition for 4_BOARD looks like the following:

A,1.50,-.25,["4-BD",instyle,S=.25,R=0,X=0,Y=-0.1],-1.25

5. Choose File, Save to save the inside14.lin. Switch back to your drawing.

6. Choose the Linetype tool, then click on Load.

7. Click on the File button, select inside14.lin from the list, and click on OK to return to the Load or Reload Linetypes dialog box. The linetype description in the Available Linetypes list should display the new 4-BD text.

8. Choose 4_BOARD from the list, and click on OK.

9. A Reload Linetype alert box appears regarding the reloading of the 4_BOARD linetype. Click on Yes.

10. From the Linetype tab, click on OK to return to the drawing.

11. To force AutoCAD into regenerating the drawing with the new 4_BOARD linetype definition, choose View, Regen from the pull-down menus. Your drawing should look like that shown in figure 5.18.

Figure 5.18 The modified 4_BOARD linetype.


TIP: Because the R=value is relative to the angle of the line drawn, to achieve right-reading text, draw your lines in from lower-left to upper-right or from upper-left to lower-right. Lines drawn in the other directions will result in the text of the linetype reading upside down.

Experiment further with the 4 board linetype by changing the R= variable to A= for an absolute angle of the text in the line. Figure 5.19 presents the application of the spacing variables used in the previous exercise so you can more fully understand the results.

Figure 5.19 The updated variables for the 4_BOARD linetype.

Summary

For the veteran user of AutoCAD, the improved interface for loading, assigning, and using linetypes is tremendous. The flexibility of the relationship between dialog boxes, tabs, and drop-down lists enables the newcomer to more quickly understand the manner in which linetypes are loaded and scaled. Release 14 has a wide assortment of linetypes--both simple and complex--available that can easily be implemented for nearly every discipline. For applications in which a linetype does not exist, the user can relatively quickly generate a new linetype. A more graphically dynamic drawing that can communicate the project clearly can now easily be generated using the substantial array of linetype features.

Because shape objects cannot be generated from within AutoCAD, adding text to a complex linetype is the most visually dynamic aspect of the complex linetype definition. For a more detailed account of how to create shapes that can be used in a complex linetype, refer to the AutoCAD Release 14 User Guide.


Previous chapterNext chapterContents

© Copyright, Macmillan Computer Publishing. All rights reserved.